﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace SY.BasicData.Infrastructures.Migrations
{
    /// <inheritdoc />
    public partial class 溯源123123 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "CrateTime",
                table: "NewPictureModels");

            migrationBuilder.DropColumn(
                name: "UpdateUser",
                table: "NewPictureModels");

            migrationBuilder.DropColumn(
                name: "CrateTime",
                table: "BasicModels");

            migrationBuilder.DropColumn(
                name: "UpdateUser",
                table: "BasicModels");

            migrationBuilder.RenameColumn(
                name: "UpdateTime",
                table: "NewPictureModels",
                newName: "UpdatorDate");

            migrationBuilder.RenameColumn(
                name: "CreateUser",
                table: "NewPictureModels",
                newName: "Updator");

            migrationBuilder.RenameColumn(
                name: "UpdateTime",
                table: "BasicModels",
                newName: "UpdatorDate");

            migrationBuilder.RenameColumn(
                name: "CreateUser",
                table: "BasicModels",
                newName: "Updator");

            migrationBuilder.AddColumn<string>(
                name: "Creator",
                table: "NewPictureModels",
                type: "nvarchar(max)",
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<DateTime>(
                name: "CreatorDate",
                table: "NewPictureModels",
                type: "datetime2",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "Creator",
                table: "BasicModels",
                type: "nvarchar(max)",
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<DateTime>(
                name: "CreatorDate",
                table: "BasicModels",
                type: "datetime2",
                nullable: true);

            migrationBuilder.CreateTable(
                name: "DeepProcessingModels",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Team = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Leader = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Batch = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_DeepProcessingModels", x => x.Id);
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "DeepProcessingModels");

            migrationBuilder.DropColumn(
                name: "Creator",
                table: "NewPictureModels");

            migrationBuilder.DropColumn(
                name: "CreatorDate",
                table: "NewPictureModels");

            migrationBuilder.DropColumn(
                name: "Creator",
                table: "BasicModels");

            migrationBuilder.DropColumn(
                name: "CreatorDate",
                table: "BasicModels");

            migrationBuilder.RenameColumn(
                name: "UpdatorDate",
                table: "NewPictureModels",
                newName: "UpdateTime");

            migrationBuilder.RenameColumn(
                name: "Updator",
                table: "NewPictureModels",
                newName: "CreateUser");

            migrationBuilder.RenameColumn(
                name: "UpdatorDate",
                table: "BasicModels",
                newName: "UpdateTime");

            migrationBuilder.RenameColumn(
                name: "Updator",
                table: "BasicModels",
                newName: "CreateUser");

            migrationBuilder.AddColumn<DateTime>(
                name: "CrateTime",
                table: "NewPictureModels",
                type: "datetime2",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AddColumn<string>(
                name: "UpdateUser",
                table: "NewPictureModels",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "CrateTime",
                table: "BasicModels",
                type: "datetime2",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AddColumn<string>(
                name: "UpdateUser",
                table: "BasicModels",
                type: "nvarchar(max)",
                nullable: true);
        }
    }
}
